<%@page import="com.daikuan.front.util.Common"%>
<%@page import="com.daikuan.front.model.Daikuan"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/pages/jsp/common/common.jsp"%><%@ include file="/pages/jsp/common/header.jsp" %>
<div class="main">
  	<div class="conL left">
    <div class="trade_loan">
      <table cellpadding="0" cellspacing="0" class="trade_loan_hd">
        <tbody>
          <tr>
            <td><img alt="渣打银行" width="137" height="48" src="./images/1589_1325750864.jpeg" class="pngfix"></td>
            <td><h3>现贷派</h3></td>
            <td><span class="yahei">纯信用类</span></td>
          </tr>
        </tbody>
      </table>
      <div class="trade_loan_bd">
        <table cellpadding="0" cellspacing="0" width="100%">
          <tbody>
            <tr>
              <td width="151"><strong>金额：</strong><span>${param.amount}万</span></td>
              <td width="262"><strong>额度范围：</strong><span>${daikuan.minAmount}—${daikuan.maxAmount}万</span></td>
              <td width="180"><strong>审批时间：</strong><span>${daikuan.loansTime}个工作日</span></td>
            </tr>
            <tr>
              <td><strong>期限：</strong><span>${param.month}个月</span></td>
              <td><strong>期限范围：</strong><span>${daikuan.minBorrowingTime}~${daikuan.maxBorrowingTime}个月 </span></td>
              <td><strong>总 利 息：</strong><span>
              <%
              	Double lixi		= 0d;
              	Double yuegong	= 0d;
              	Double rate		= 0d;
              try{
	              	Object dkObj	= request.getAttribute("daikuan");
	              	String amount	= request.getParameter("amount");
	              	Double amountBle= Double.valueOf(amount);
	              	String month	= request.getParameter("month");
	              	Double monthBle= Double.valueOf(month);
	              	
	              if(null != dkObj){
	            	  Daikuan dk	= (Daikuan)dkObj;
	            	  String maxInterestRate	= dk.getMaxInterestRate();
	            	  String minInterestRate	= dk.getMinInterestRate();
	            	  
	            	 Double maxInterestRateble	= Double.valueOf(maxInterestRate);
	            	 Double minInterestRateble	= Double.valueOf(minInterestRate);
	            	 
	            	 rate			= (maxInterestRateble + minInterestRateble) / 2;
	            	 lixi			= amountBle * amountBle * rate / 100;
	            	 yuegong		= (amountBle+lixi) / monthBle * 10000;
	              }
              }catch(Exception e){
            	  e.printStackTrace();
              }
              %>
              <%=Common.m2(lixi,2)%>万</span></td>
            </tr>
            <tr>
              <td><strong>月供：</strong><span><%=Common.m2(yuegong,0)%>元 </span></td>
              <td><strong>还款方式：</strong><span>分期还款</span></td>
              <td style="text-align:right;"><a id="onscroll_1" class="shenqing" href="javascript:;" action-type="apply-question" data="{&quot;pid&quot;:&quot;8t9sm7&quot;, &quot;loan_type&quot;: &quot;2053&quot;, &quot;loan_amount&quot;: &quot;10&quot;, &quot;loan_term&quot;: &quot;12&quot;}" style="display: inline-block;">立即申请</a></td>
            </tr>
            <tr>
              <td colspan="3"><div class="term_block_hd" style="height: 10px;margin-bottom: 10px;"></div>
                <table>
                  <tbody>
                    <tr>
                      <td style="width: 80px;vertical-align:top;"><strong>专家点评：</strong></td>
                      <td><span>
                        ${daikuan.description}
                        </span></td>
                      <td style="width: 40px;"></td>
                    </tr>
                  </tbody>
                </table></td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <div class="blank5px"></div>
    <div class="con">
      <div class="conTitem"> <span><a href="#">更多>></a></span>
        <h2>贷款</h2>
      </div>
      <div class="skb">
        <div class="skbtit">
          <div class="gt">${daikuan.daikuanTypeName}</div>
          <a class="shenqing" href="#" style="display: inline-block; margin-left:10px; float:right">立即申请</a> </div>
        <div class="notice_loan_bd"> 
          <!--申请条件-->
          <div class="term_block">
            <div class="term_block_hd" id="loan_apply_conditions">
              <h4>申请条件</h4>
            </div>
            <div class="term_block_bd">
              ${daikuan.conditionsApply}
            </div>
          </div>
          <!--需要资料-->
          <div class="term_block">
            <div class="term_block_hd">
              <h4 id="loan_doc_needed">需要资料</h4>
            </div>
            <div class="term_block_bd">
               ${daikuan.materialsNeeded}
            </div>
          </div>
          <!--贷款流程-->
          <div class="term_block">
            <div class="term_block_hd">
              <h4 id="loan_liucheng">贷款流程</h4>
            </div>
            <div class="term_block_bd">
              <div> <img usemap="#Map2" src="./images/diyadaikuan.jpg" alt="">
                <map id="Map2" name="Map2">
                  <area target="_blank" href="http://www.bankrate.com.cn/a_2013_0517_102629.html" alt="如何选择贷款产品" title="如何选择贷款产品" coords="3,3,80,172" shape="rect">
                  <area target="_blank" href="http://www.bankrate.com.cn/a_2013_0520_103034.html" alt="贷款申请" title="贷款申请" coords="99,2,169,165" shape="rect">
                  <area target="_blank" href="http://www.bankrate.com.cn/a_2013_0517_102717.html" title="第三方资产评估" alt="第三方资产评估" coords="203,2,277,166" shape="rect">
                  <area target="_blank" href="http://www.bankrate.com.cn/a_2013_0517_102720.html" alt="贷款机构审批" title="贷款机构审批" coords="300,0,378,172" shape="rect">
                  <area target="_blank" href="http://www.bankrate.com.cn/a_2013_0517_102726.html" alt="办理抵押手续 机构发放贷款" title="办理抵押手续 机构发放贷款" coords="402,2,514,169" shape="rect">
                  <area target="_blank" href="http://www.bankrate.com.cn/a_2013_0517_102727.html" alt="结清贷款 完成解押" title="结清贷款 完成解押" coords="550,1,632,172" shape="rect">
                </map>
              </div>
            </div>
          </div>
          <!--利率及费用说明-->
          <div class="term_block">
            <div class="term_block_hd">
              <h4 id="loan_rate">利率及费用说明</h4>
            </div>
            <div class="term_block_bd">
              <div class="deadline">
                <table cellpadding="0" cellspacing="0" width="521">
                  <tbody>
                    <tr>
                      <th>贷款期限（月）</th>
                      <th>费率说明</th>
                    </tr>
                    <tr>
                      <td>${daikuan.minBorrowingTime}~${daikuan.maxBorrowingTime}个月</td>
                      <td>月利率:${daikuan.minInterestRate}-${daikuan.maxInterestRate}%<br/>
                      ${daikuan.rateDescription}</td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
          <!--利率计算器-->
          <div class="term_block">
            <div class="term_block_hd">
              <h4 id="loan_calc">利息计算器</h4>
            </div>
            <div class="term_block_bd">
              <div class="calculator">
                <form id="loan_yg">
                  <table class="table_1" cellpadding="0" cellspacing="0" width="540">
                    <tbody>
                      <tr>
                        <th>贷款金额</th>
                        <td width="140"><input type="text" value="10" name="loan_amount"></td>
                        <td>万元</td>
                        <th>一次收费</th>
                        <td width="140"><input type="text" name="once_rate" value=""></td>
                        <td>%</td>
                      </tr>
                      <tr>
                        <th>贷款期限</th>
                        <td width="140"><input type="text" value="12" name="term"></td>
                        <td>个月</td>
                        <th>月管理费 </th>
                        <td width="140"><input type="text" name="month_manage_rate" value=""></td>
                        <td>%</td>
                      </tr>
                      <tr>
                        <th>年利率</th>
                        <td width="140"><input type="text" name="rate" value="19.8"></td>
                        <td style="text-align:left;padding-left:4px;">%</td>
                      </tr>
                    </tbody>
                  </table>
                  <span class="jisuan" style="cursor: pointer">计  算</span>
                </form>
                <table class="table_2" cellpadding="0" cellspacing="0" width="600">
                  <tbody>
                    <tr>
                      <td width="240">总利息：<b><span style="color:#f58500;" id="total_interest">0</span></b>万元<span style="color:#9d9d9d;padding-left:10px;">含所有费用</span></td>
                      <td width="156">每天利息：<b><span style="color:#f58500;" id="day_interest">0</span></b>元</td>
                      <td>月供：<b><span style="color:#f58500;" id="monthly_payment">0</span></b>元</td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
	<div class="conR right">
    <%@ include file="/pages/jsp/right/middle.jsp"%>
  </div>
</div>
 <div class="blank5px"></div>
 <%@ include file="/pages/jsp/common/footer.jsp"%>